﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>登录</title>
</head>
<body>
    <form id="form1" runat="server">
    <f:PageManager ID="PageManager1" runat="server" />
    <f:Window ID="Window1" runat="server" Title=" 登录" IsModal="false" EnableClose="false"
        WindowPosition="GoldenSection" Width="350px">
        <Items>
            <f:SimpleForm ID="SimpleForm1" runat="server" ShowBorder="false" BodyPadding="10px"
                LabelWidth="80px" ShowHeader="false">
                <Items>
                    <f:TextBox ID="tbxUserName" Label="用户名" Required="true" runat="server" MaxLength="20">
                    </f:TextBox>
                    <f:TextBox ID="tbxPassword" Label="密码" TextMode="Password" Required="true" runat="server">
                    </f:TextBox>
                </Items>
            </f:SimpleForm>
        </Items>
        <Toolbars>
            <f:Toolbar ID="Toolbar1" runat="server" ToolbarAlign="Right" Position="Footer">
                <Items>
                    <f:Button ID="btnLogin" Text="登录" ValidateForms="SimpleForm1" HideMode="Display"
                        ValidateTarget="Top" runat="server" OnClick="btnLogin_Click">
                    </f:Button>
                    <f:Button ID="btnReset" Text="重置" Type="Reset" EnablePostBack="false" HideMode="Display"
                        runat="server">
                    </f:Button>
                </Items>
            </f:Toolbar>
        </Toolbars>
    </f:Window>
    </form>
    <script type="text/javascript">
        document.onkeydown = function (event) {
            e = event ? event : (window.event ? window.event : null);
            if (e.keyCode == 13) {
                //执行的方法  
                F.disable('Window1_Toolbar1_btnLogin');
                __doPostBack('Window1$Toolbar1$btnLogin', '');
            }
        }     
    </script>
</body>
</html>
